package com.xxcxcxcx.jobsystem;

import com.xxcxcxcx.jobsystem.compat.AppleSkinCompat;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod("jobsystem")
public class Main {
    public static final String MOD_ID = "jobsystem";
    public Main() {
        IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
        bus.addListener((FMLCommonSetupEvent event) -> setup());
        MinecraftForge.EVENT_BUS.register(this);
    }
    public void setup() {
        if(ModList.get().isLoaded("appleskin")) {
            MinecraftForge.EVENT_BUS.register(AppleSkinCompat.class);
        }
    }
}
